package com.game.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.game.pojo.po.UserData;
import com.game.dao.UserDataDao;
import com.game.service.UserDataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lvhao
 * @since 2020-07-25
 */
@Service
public class UserDataServiceImpl extends ServiceImpl<UserDataDao, UserData> implements UserDataService {
    @Autowired
    private UserDataDao userDataDao;

    @Override
    public List<UserData> getByUserId(int userId) {
        QueryWrapper<UserData> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id",userId);
        return userDataDao.selectList(queryWrapper);
    }
}
